package com.atguigu.common.to.es;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.math.BigDecimal;
import java.util.List;

/**
 * 封装es中的 上传接口条件


 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class SpuUpTo {
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long skuId;//skuid
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long spuId; //商品id
    private String skuTitle; //主标题
    private BigDecimal skuPrice; //价格
    private String skuImg; //默认图片地址
    private Long saleCount; //销量
    private boolean hasStock; //是否存在库存
    private BigDecimal hotScore;//热门评分
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long brandId; //品牌id
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long catalogId;//分类id
    private String brandName; //品牌名称
    private String brandImg;//品牌默认图片
    private String catalogName;//分类名称
    private List<AttrTo> attrs;


}
